3.1.85 \(\int \cos ^8(c+d x) (a+i a \tan (c+d x))^8 \, dx\) [85]

Optimal. Leaf size=43 \[ -\frac {i \left (a^3+i a^3 \tan (c+d x)\right )^4}{8 d (a-i a \tan (c+d x))^4} \]

[Out]

-1/8*I*(a^3+I*a^3*tan(d*x+c))^4/d/(a-I*a*tan(d*x+c))^4

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 37} \begin {gather*} -\frac {i \left (a^3+i a^3 \tan (c+d x)\right )^4}{8 d (a-i a \tan (c+d x))^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^8*(a + I*a*Tan[c + d*x])^8,x]

[Out]

((-1/8*I)*(a^3 + I*a^3*Tan[c + d*x])^4)/(d*(a - I*a*Tan[c + d*x])^4)

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \cos ^8(c+d x) (a+i a \tan (c+d x))^8 \, dx &=-\frac {\left (i a^9\right ) \text {Subst}\left (\int \frac {(a+x)^3}{(a-x)^5} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i \left (a^3+i a^3 \tan (c+d x)\right )^4}{8 d (a-i a \tan (c+d x))^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.35, size = 31, normalized size = 0.72 \begin {gather*} -\frac {i a^8 (\cos (c+d x)+i \sin (c+d x))^8}{8 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^8*(a + I*a*Tan[c + d*x])^8,x]

[Out]

((-1/8*I)*a^8*(Cos[c + d*x] + I*Sin[c + d*x])^8)/d

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 450 vs. \(2 (38 ) = 76\).
time = 0.21, size = 451, normalized size = 10.49

method result size
risch \(-\frac {i a^{8} {\mathrm e}^{8 i \left (d x +c \right )}}{8 d}\) \(19\)
derivativedivides \(\frac {a^{8} \left (-\frac {\left (\sin ^{7}\left (d x +c \right )+\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \sin \left (d x +c \right )}{16}\right ) \cos \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )-i a^{8} \left (\sin ^{8}\left (d x +c \right )\right )-28 a^{8} \left (-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{48}-\frac {5 \sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{64}+\frac {5 \sin \left (d x +c \right ) \cos \left (d x +c \right )}{128}+\frac {5 d x}{128}+\frac {5 c}{128}\right )+56 i a^{8} \left (-\frac {\left (\sin ^{4}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{8}-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{12}-\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{24}\right )+70 a^{8} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{8}-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{16}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{64}+\frac {3 d x}{128}+\frac {3 c}{128}\right )-56 i a^{8} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{6}\left (d x +c \right )\right )}{8}-\frac {\left (\cos ^{6}\left (d x +c \right )\right )}{24}\right )-28 a^{8} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{7}\left (d x +c \right )\right )}{8}+\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{48}+\frac {5 d x}{128}+\frac {5 c}{128}\right )-i a^{8} \left (\cos ^{8}\left (d x +c \right )\right )+a^{8} \left (\frac {\left (\cos ^{7}\left (d x +c \right )+\frac {7 \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\cos ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \cos \left (d x +c \right )}{16}\right ) \sin \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )}{d}\) \(451\)
default \(\frac {a^{8} \left (-\frac {\left (\sin ^{7}\left (d x +c \right )+\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \sin \left (d x +c \right )}{16}\right ) \cos \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )-i a^{8} \left (\sin ^{8}\left (d x +c \right )\right )-28 a^{8} \left (-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{48}-\frac {5 \sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{64}+\frac {5 \sin \left (d x +c \right ) \cos \left (d x +c \right )}{128}+\frac {5 d x}{128}+\frac {5 c}{128}\right )+56 i a^{8} \left (-\frac {\left (\sin ^{4}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{8}-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{12}-\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{24}\right )+70 a^{8} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{8}-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{16}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{64}+\frac {3 d x}{128}+\frac {3 c}{128}\right )-56 i a^{8} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{6}\left (d x +c \right )\right )}{8}-\frac {\left (\cos ^{6}\left (d x +c \right )\right )}{24}\right )-28 a^{8} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{7}\left (d x +c \right )\right )}{8}+\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{48}+\frac {5 d x}{128}+\frac {5 c}{128}\right )-i a^{8} \left (\cos ^{8}\left (d x +c \right )\right )+a^{8} \left (\frac {\left (\cos ^{7}\left (d x +c \right )+\frac {7 \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\cos ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \cos \left (d x +c \right )}{16}\right ) \sin \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )}{d}\) \(451\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^8*(a+I*a*tan(d*x+c))^8,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^8*(-1/8*(sin(d*x+c)^7+7/6*sin(d*x+c)^5+35/24*sin(d*x+c)^3+35/16*sin(d*x+c))*cos(d*x+c)+35/128*d*x+35/12
8*c)-I*a^8*sin(d*x+c)^8-28*a^8*(-1/8*cos(d*x+c)^3*sin(d*x+c)^5-5/48*sin(d*x+c)^3*cos(d*x+c)^3-5/64*sin(d*x+c)*
cos(d*x+c)^3+5/128*sin(d*x+c)*cos(d*x+c)+5/128*d*x+5/128*c)+56*I*a^8*(-1/8*sin(d*x+c)^4*cos(d*x+c)^4-1/12*sin(
d*x+c)^2*cos(d*x+c)^4-1/24*cos(d*x+c)^4)+70*a^8*(-1/8*sin(d*x+c)^3*cos(d*x+c)^5-1/16*sin(d*x+c)*cos(d*x+c)^5+1
/64*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/128*d*x+3/128*c)-56*I*a^8*(-1/8*sin(d*x+c)^2*cos(d*x+c)^6-1/24*
cos(d*x+c)^6)-28*a^8*(-1/8*sin(d*x+c)*cos(d*x+c)^7+1/48*(cos(d*x+c)^5+5/4*cos(d*x+c)^3+15/8*cos(d*x+c))*sin(d*
x+c)+5/128*d*x+5/128*c)-I*a^8*cos(d*x+c)^8+a^8*(1/8*(cos(d*x+c)^7+7/6*cos(d*x+c)^5+35/24*cos(d*x+c)^3+35/16*co
s(d*x+c))*sin(d*x+c)+35/128*d*x+35/128*c))

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 136 vs. \(2 (35) = 70\).
time = 0.51, size = 136, normalized size = 3.16 \begin {gather*} -\frac {a^{8} \tan \left (d x + c\right )^{7} - 4 i \, a^{8} \tan \left (d x + c\right )^{6} - 7 \, a^{8} \tan \left (d x + c\right )^{5} + 8 i \, a^{8} \tan \left (d x + c\right )^{4} + 7 \, a^{8} \tan \left (d x + c\right )^{3} - 4 i \, a^{8} \tan \left (d x + c\right )^{2} - a^{8} \tan \left (d x + c\right )}{{\left (\tan \left (d x + c\right )^{8} + 4 \, \tan \left (d x + c\right )^{6} + 6 \, \tan \left (d x + c\right )^{4} + 4 \, \tan \left (d x + c\right )^{2} + 1\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*(a+I*a*tan(d*x+c))^8,x, algorithm="maxima")

[Out]

-(a^8*tan(d*x + c)^7 - 4*I*a^8*tan(d*x + c)^6 - 7*a^8*tan(d*x + c)^5 + 8*I*a^8*tan(d*x + c)^4 + 7*a^8*tan(d*x
+ c)^3 - 4*I*a^8*tan(d*x + c)^2 - a^8*tan(d*x + c))/((tan(d*x + c)^8 + 4*tan(d*x + c)^6 + 6*tan(d*x + c)^4 + 4
*tan(d*x + c)^2 + 1)*d)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 17, normalized size = 0.40 \begin {gather*} -\frac {i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )}}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*(a+I*a*tan(d*x+c))^8,x, algorithm="fricas")

[Out]

-1/8*I*a^8*e^(8*I*d*x + 8*I*c)/d

________________________________________________________________________________________

Sympy [A]
time = 0.44, size = 36, normalized size = 0.84 \begin {gather*} \begin {cases} - \frac {i a^{8} e^{8 i c} e^{8 i d x}}{8 d} & \text {for}\: d \neq 0 \\a^{8} x e^{8 i c} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**8*(a+I*a*tan(d*x+c))**8,x)

[Out]

Piecewise((-I*a**8*exp(8*I*c)*exp(8*I*d*x)/(8*d), Ne(d, 0)), (a**8*x*exp(8*I*c), True))

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 381 vs. \(2 (35) = 70\).
time = 1.17, size = 381, normalized size = 8.86 \begin {gather*} -\frac {i \, a^{8} e^{\left (36 i \, d x + 22 i \, c\right )} + 14 i \, a^{8} e^{\left (34 i \, d x + 20 i \, c\right )} + 91 i \, a^{8} e^{\left (32 i \, d x + 18 i \, c\right )} + 364 i \, a^{8} e^{\left (30 i \, d x + 16 i \, c\right )} + 1001 i \, a^{8} e^{\left (28 i \, d x + 14 i \, c\right )} + 2002 i \, a^{8} e^{\left (26 i \, d x + 12 i \, c\right )} + 3003 i \, a^{8} e^{\left (24 i \, d x + 10 i \, c\right )} + 3432 i \, a^{8} e^{\left (22 i \, d x + 8 i \, c\right )} + 3003 i \, a^{8} e^{\left (20 i \, d x + 6 i \, c\right )} + 2002 i \, a^{8} e^{\left (18 i \, d x + 4 i \, c\right )} + 1001 i \, a^{8} e^{\left (16 i \, d x + 2 i \, c\right )} + 91 i \, a^{8} e^{\left (12 i \, d x - 2 i \, c\right )} + 14 i \, a^{8} e^{\left (10 i \, d x - 4 i \, c\right )} + i \, a^{8} e^{\left (8 i \, d x - 6 i \, c\right )} + 364 i \, a^{8} e^{\left (14 i \, d x\right )}}{8 \, {\left (d e^{\left (28 i \, d x + 14 i \, c\right )} + 14 \, d e^{\left (26 i \, d x + 12 i \, c\right )} + 91 \, d e^{\left (24 i \, d x + 10 i \, c\right )} + 364 \, d e^{\left (22 i \, d x + 8 i \, c\right )} + 1001 \, d e^{\left (20 i \, d x + 6 i \, c\right )} + 2002 \, d e^{\left (18 i \, d x + 4 i \, c\right )} + 3003 \, d e^{\left (16 i \, d x + 2 i \, c\right )} + 3003 \, d e^{\left (12 i \, d x - 2 i \, c\right )} + 2002 \, d e^{\left (10 i \, d x - 4 i \, c\right )} + 1001 \, d e^{\left (8 i \, d x - 6 i \, c\right )} + 364 \, d e^{\left (6 i \, d x - 8 i \, c\right )} + 91 \, d e^{\left (4 i \, d x - 10 i \, c\right )} + 14 \, d e^{\left (2 i \, d x - 12 i \, c\right )} + 3432 \, d e^{\left (14 i \, d x\right )} + d e^{\left (-14 i \, c\right )}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*(a+I*a*tan(d*x+c))^8,x, algorithm="giac")

[Out]

-1/8*(I*a^8*e^(36*I*d*x + 22*I*c) + 14*I*a^8*e^(34*I*d*x + 20*I*c) + 91*I*a^8*e^(32*I*d*x + 18*I*c) + 364*I*a^
8*e^(30*I*d*x + 16*I*c) + 1001*I*a^8*e^(28*I*d*x + 14*I*c) + 2002*I*a^8*e^(26*I*d*x + 12*I*c) + 3003*I*a^8*e^(
24*I*d*x + 10*I*c) + 3432*I*a^8*e^(22*I*d*x + 8*I*c) + 3003*I*a^8*e^(20*I*d*x + 6*I*c) + 2002*I*a^8*e^(18*I*d*
x + 4*I*c) + 1001*I*a^8*e^(16*I*d*x + 2*I*c) + 91*I*a^8*e^(12*I*d*x - 2*I*c) + 14*I*a^8*e^(10*I*d*x - 4*I*c) +
 I*a^8*e^(8*I*d*x - 6*I*c) + 364*I*a^8*e^(14*I*d*x))/(d*e^(28*I*d*x + 14*I*c) + 14*d*e^(26*I*d*x + 12*I*c) + 9
1*d*e^(24*I*d*x + 10*I*c) + 364*d*e^(22*I*d*x + 8*I*c) + 1001*d*e^(20*I*d*x + 6*I*c) + 2002*d*e^(18*I*d*x + 4*
I*c) + 3003*d*e^(16*I*d*x + 2*I*c) + 3003*d*e^(12*I*d*x - 2*I*c) + 2002*d*e^(10*I*d*x - 4*I*c) + 1001*d*e^(8*I
*d*x - 6*I*c) + 364*d*e^(6*I*d*x - 8*I*c) + 91*d*e^(4*I*d*x - 10*I*c) + 14*d*e^(2*I*d*x - 12*I*c) + 3432*d*e^(
14*I*d*x) + d*e^(-14*I*c))

________________________________________________________________________________________

Mupad [B]
time = 3.48, size = 66, normalized size = 1.53 \begin {gather*} -\frac {a^8\,\mathrm {tan}\left (c+d\,x\right )\,\left ({\mathrm {tan}\left (c+d\,x\right )}^2-1\right )}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+{\mathrm {tan}\left (c+d\,x\right )}^3\,4{}\mathrm {i}-6\,{\mathrm {tan}\left (c+d\,x\right )}^2-\mathrm {tan}\left (c+d\,x\right )\,4{}\mathrm {i}+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^8*(a + a*tan(c + d*x)*1i)^8,x)

[Out]

-(a^8*tan(c + d*x)*(tan(c + d*x)^2 - 1))/(d*(tan(c + d*x)^3*4i - 6*tan(c + d*x)^2 - tan(c + d*x)*4i + tan(c +
d*x)^4 + 1))

________________________________________________________________________________________